{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Extinction Over a Finite Path - Section 7.2 (Petty, 2006)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Calculating transmission from optical depths"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "%pylab inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# Create an array of optical depths\n",
    "tau = arange(0.,10.,0.1)\n",
    "T   = exp(-tau)\n",
    "\n",
    "figure()\n",
    "plot(tau,T)\n",
    "grid()\n",
    "xlabel('Optical Depth')\n",
    "ylabel('Transmission')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "figure()\n",
    "semilogx(tau,T)\n",
    "grid()\n",
    "xlabel('Optical Depth')\n",
    "ylabel('Transmission')\n",
    "title('Semilog-linear plot')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "figure()\n",
    "loglog(tau,T)\n",
    "grid()\n",
    "xlabel('Optical Depth')\n",
    "ylabel('Transmission')\n",
    "title('Log-log plot')"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
